﻿//--------------------------------------------------------------------------------------------------------------------- 
// <copyright file="AdaptersTraceHelper.cs" company="Collaboris">
//   
// </copyright>
// <summary>
//   Defines the AdaptersTraceHelper type.
// </summary>
//---------------------------------------------------------------------------------------------------------------------
namespace Collaboris.Saf.Tracing
{
    using System.Diagnostics;
    using System.Xml.Serialization;

    using Utils;

    /// <summary>
    /// Defines the trace helper for Adapters. The name of the TraceSwitch used by this helper is "AdaptersTrace".
    /// <remarks>
    /// To see trace messages used by this TraceHelper the following entry need to be added to the application configuration file (replace x with the required trace level):
    /// <code>
    /// <configuration>
    /// <system.diagnostics>
    ///  <switches>
    ///    <add name="AdaptersTrace" value="x" />
    ///  </switches>
    /// </system.diagnostics>
    /// </configuration>
    /// </code>
    /// </remarks>
    /// </summary>
    public class AdaptersTraceHelper : TraceHelper
    {
        private static TraceSwitch traceSwitch = new TraceSwitch("AdaptersTrace", "Trace switch for the adapters");

        [XmlIgnore]
        public static TraceSwitch TraceSwitch
        {
            get
            {
                return traceSwitch;
            }
        }        

        #region Constructors (2) 

        public AdaptersTraceHelper(string ownerClassName)
                : base(ownerClassName, traceSwitch)
        {
        }

        public AdaptersTraceHelper(object OwnerClass) : base(OwnerClass, traceSwitch)
        {
        }

        #endregion Constructors 
    }
}